﻿//-----------------------------------------------------------------------
// <copyright file="Dance.cs" company="Christian Coda">
// Copyright (c) Christian Coda. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DancingSite.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Entity;
    using System.Linq;
    using System.Web;

    /// <summary>
    /// The dance event model.
    /// </summary>
    public class Dance
    {
        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        public int DanceId { get; set; }

        /// <summary>
        /// Gets or sets the title of this dance.
        /// </summary>
        [Required(ErrorMessage = "Title is required")]
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the genre of this dance.
        /// Tango, salsa, jive. etc
        /// </summary>
        public virtual DanceGenre Genre { get; set; }

        /// <summary>
        /// Gets or sets the category of this dance.
        /// Class, party, competition etc.
        /// </summary>
        public virtual EventCategory Category { get; set; }

        /// <summary>
        /// Gets or sets the scheduled instances of this dance.
        /// </summary>
        public virtual ICollection<Schedule> Schedules { get; set; }

        /// <summary>
        /// Gets or sets a description of this dance.
        /// </summary>
        [Required(ErrorMessage = "Description is required")]
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the location of this dance.
        /// </summary>
        public virtual Location Location { get; set; }

        /// <summary>
        /// Gets or sets the price of this dance..
        /// </summary>
        [Required(ErrorMessage = "Price is required")]
        [Range(1, 1000, ErrorMessage = "Price must be between 1 and 1000")]
        [DisplayFormat(DataFormatString = "{0:c}")]
        public decimal Price { get; set; }
    }
}